﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JinfuyuanProject.Entity;
using JinfuyuanProject.Service.Interface;
using JinfuyuanProject.Repository.Interface;

namespace JinfuyuanProject.Service
{
    public class ProductApplicationService: IProductApplicationService
    {
        private readonly IProductApplicationRepository _productApplicationRepository;

        public ProductApplicationService(IProductApplicationRepository productApplicationRepository)
        {
            _productApplicationRepository = productApplicationRepository;
        }
        public bool Delete(ProductApplication productApplication)
        {
            return _productApplicationRepository.Delete(productApplication);
        }

        public IQueryable<ProductApplication> GetList()
        {
            return _productApplicationRepository.GetList();
        }

        public ProductApplication GetModel(int Id)
        {
            return _productApplicationRepository.GetModel(Id);
        }

        public int Insert(ProductApplication productApplication)
        {
            return _productApplicationRepository.Insert(productApplication);
        }

        public bool Update(ProductApplication productApplication)
        {
            return _productApplicationRepository.Update(productApplication);
        }
    }
}
